import {
    Route,
    Routes,
} from 'react-router-dom'
import MusicPlazaPage from '../pages/musicPlazaPage'
import Layout from '../layout'
import EmptyPage from '../pages/Empty'
const routerConfig = [
    {
        path: "/",
        element: (
            <MusicPlazaPage></MusicPlazaPage>
        )
    },
    {
        path: "/welcome",
        element: (
            <div>welcome</div>
        )
    },
    {
        path: '*',
        element: <EmptyPage></EmptyPage>
    }
]
const RouteComponents = () => {
    return (
        <Routes>
            <Route
                element={<Layout></Layout>}
            >
                {
                    routerConfig.map(({
                        path, element
                    }) => {
                        return <Route path={path} element={element} key={path} />
                    })}
            </Route>
        </Routes>
    )
}
export default RouteComponents;
